package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.TFillinganswerMapper;
import com.ruoyi.project.system.domain.TFillinganswer;
import com.ruoyi.project.system.service.ITFillinganswerService;

/**
 * 填空题答案Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-05-09
 */
@Service
public class TFillinganswerServiceImpl implements ITFillinganswerService 
{
    @Autowired
    private TFillinganswerMapper tFillinganswerMapper;

    /**
     * 查询填空题答案
     * 
     * @param fillinganswerId 填空题答案ID
     * @return 填空题答案
     */
    @Override
    public TFillinganswer selectTFillinganswerById(Integer fillinganswerId)
    {
        return tFillinganswerMapper.selectTFillinganswerById(fillinganswerId);
    }

    /**
     * 查询填空题答案列表
     * 
     * @param tFillinganswer 填空题答案
     * @return 填空题答案
     */
    @Override
    public List<TFillinganswer> selectTFillinganswerList(TFillinganswer tFillinganswer)
    {
        return tFillinganswerMapper.selectTFillinganswerList(tFillinganswer);
    }

    /**
     * 新增填空题答案
     * 
     * @param tFillinganswer 填空题答案
     * @return 结果
     */
    @Override
    public int insertTFillinganswer(TFillinganswer tFillinganswer)
    {
        tFillinganswer.setCreateTime(DateUtils.getNowDate());
        return tFillinganswerMapper.insertTFillinganswer(tFillinganswer);
    }

    /**
     * 修改填空题答案
     * 
     * @param tFillinganswer 填空题答案
     * @return 结果
     */
    @Override
    public int updateTFillinganswer(TFillinganswer tFillinganswer)
    {
        return tFillinganswerMapper.updateTFillinganswer(tFillinganswer);
    }

    /**
     * 批量删除填空题答案
     * 
     * @param fillinganswerIds 需要删除的填空题答案ID
     * @return 结果
     */
    @Override
    public int deleteTFillinganswerByIds(Integer[] fillinganswerIds)
    {
        return tFillinganswerMapper.deleteTFillinganswerByIds(fillinganswerIds);
    }

    /**
     * 删除填空题答案信息
     * 
     * @param fillinganswerId 填空题答案ID
     * @return 结果
     */
    @Override
    public int deleteTFillinganswerById(Integer fillinganswerId)
    {
        return tFillinganswerMapper.deleteTFillinganswerById(fillinganswerId);
    }
}
